import loadable from "@loadable/component"
import * as React from 'react'
import {
    // AppstoreOutlined,
    // MenuUnfoldOutlined,
    // MenuFoldOutlined,
    PieChartOutlined,
    DesktopOutlined,
    ContainerOutlined,
    // MailOutlined,
} from '@ant-design/icons'

const Home=loadable(()=>import('./home/Home'))
const Home2=loadable(()=>import('./home/Home2'))
const UserList = loadable(() => import('./system/UserList'))
const GoodList = loadable(() => import('./good/GoodList'))
const GoodAddOrEdit = loadable(() => import('./good/GoodAddOrEdit'))

export default [{
        id: 110,
        title: '主页',
        icon: <ContainerOutlined/>,
        permisson:['admin','visitor','editor'],
        children: [{
                id: 1,
                path: '/',
                component: Home,
                text: '学习redux',
                permisson: ['admin', 'editor','visitor']
            }, {
                id: 2,
                path: '/home2',
                component: Home2,
                text: '学习tsx',
                permisson: ['visitor','admin']
            }],
        },
    {
        id: 1210,
        title: '系统管理',
        icon: <DesktopOutlined />,
        permisson: ['admin'],
        children: [{
            id: 3,
            path: '/user/list',
            component: UserList,
            text: '用户管理',
            permisson: ['admin']
        }],
    },
    {
        id: 11110,
        title: '商品管理',
        icon: <PieChartOutlined />,
        permisson: ['editor','admin'],
        children: [{
            id: 5,
            path: '/good/list',
            component: GoodList,
            text: '商品管理',
            permisson: ['editor', 'admin'],
            children: [{
                id: 6,
                path: '/good/add',
                component: GoodAddOrEdit,
                text: '商品新增',
                permisson: ['editor', 'admin']
            },
            {
                id: 8,
                path: '/good/edit/:id',
                component: GoodAddOrEdit,
                text: '商品编辑',
                permisson: ['editor', 'admin']
            }]
        }, ],
    },
    ]